Pipe Network - General Rules

This section outlines rules for using ML functionClosed A function calculates a result according to the current value of its inputs. A function has no internal data and is not linked to declared instances. in the Pipe Network context.

Languages

Functions that interact with the Pipe Network start with ML (e.g., MLAxisRel, MLPrfWriteOScale, or MLMstRel).

These functions can be used in all the Programming Languages.

BlockID Inputs

The BlockID input is a DINT ID.

It is the second input to a Pipe Network function when using the FFLD Language:

Example of BlockID Inputs

The BlockID input is the first one if programming in the STClosed Structured text - A high-level language that is block structured and syntactically resembles Pascal. Language:

MLGearRatSlp( BlockID (*DINT*) );

This input identifies the block in the Pipe Network the function interacts with.

If using the graphical Pipe Network Editor, the used variable starts with PipeNetwork.xxx.

The exception is if it is acting on a CAM profileClosed The position of a slave axis is mathematically linked to the position of a master axis. Example: A system where two rotating drums turn at a given ratio to each other. A more advanced case of electronic gearing is electronic camming. With electronic camming, a slave axis follows a profile that is a function of the master position. This profile need not be linear but it must be a mathematical function., then the input is named ProfileID and the variable starts with Profiles.xxx.


  • When selecting a Pipe Block as the BlockID for an ML function, choose a Pipe Block with the same type which is in the name of the ML function.

    Example: MLMstxxx functions expect a Master block to be chosen for the BlockID.
    MLAxisxxx functions need an Axis block to be chosen for the AxisID input and MLPrfxxx functions need a Profile entered for ProfileID, etc.

Output Status

Most Pipe Network functions have a default Boolean output labeled either Q or OK:

Example of Output Status

What is the Difference between Q and OK?

  • OK returns True when the function successfully executes.
  • Q output is initially set to 0 (zero) until the first time the block is successfully executed in a running program.
    • After this execution, the Q output is set to 1.
    • It remains to 1 until the function does NOT execute successfully.
    • Alternately, after an unsuccessful execution the Q output is set to 0 (zero).
    • It remains to 0 (zero) until a successful execution resumes.

Difference between Q and OK

Figure 1: Execution Not Successful

When Q is Set to TRUE

Verify the description for each individual function blockClosed A function block groups an algorithm and a set of private data. It has inputs and outputs. to be sure how its Q output is behaving.

  • Some functions change the Q output from low to high immediately after it starts executing.
  • Others (including most functions that command motion) wait to change the output until the function has completely finished executing.

Input Parameters

Missing Input Parameters

All inputs to a function must be entered for code to compile.

Position versus Distance

Default Block Parameters

The parameters set when initializing a Pipe Network block are used as defaults when calling functions.

Concept Link IconSee Also